package com.xyy.saas.payment.adpater.jdCredit.vo;

import com.jddglobal.open.request.base.JddRequest;
import com.jddglobal.open.support.util.JacksonUtils;
import com.xyy.saas.payment.adpater.jdCredit.resp.SmapiResponse;
import lombok.Data;
import lombok.ToString;
import org.apache.http.client.utils.DateUtils;

import java.util.Date;

/**
 * @ClassName PushPreCreditListReq
 * @Author renwg
 * @Date 2024/6/7 14:19
 * @Version 1.0
 */

@Data
@ToString
public class PushPreCreditListReq implements JddRequest<SmapiResponse> {
    /**
     * 请求编号
     */
    private String reqNo;
    /**
     * 请求时间
     */
    private String reqDate;
    /**
     * 产品编号
     */
    private String productCode;
    /**
     * 合作方编号
     */
    private String partnerCode;
    /**
     * 订单编号
     */
    private String orderCode;

    /**
     * 订单状态
     */
    private String orderStatus;

    @Override
    public String getApiMethod() {
        return "/smapi/v1/nav/pushOrderStatus";
    }

    @Override
    public String getJsonParams() {
        return JacksonUtils.toJson(this);
    }

    @Override
    public Class<SmapiResponse> getResponseClass() {
        return SmapiResponse.class;
    }

    @Override
    public String getRequestTime() {
        return DateUtils.formatDate(new Date(), "yyyyMMddHHmmssSSS");
    }
}